#pragma once
#include <vector>
#include "book.h"
#include "Chrono.h"
#include "Patron.h"
#include "Error.h"
using std::vector;


namespace Books{

	
struct Transaction
{
	Transaction(const Book& b, const Patron& p, const Date& d)
		:book(b), Reader(p), data(d)
	{};
	Book book;
	Patron Reader;
	Date data;
};  


		
class Libray
{
public:
	Libray(void);
	
	bool find_book(const Book& b) const;
	void add_book(const Book& b);
	
	bool find_reader(const Patron& p) const;
	void add_reader(const Patron& p);
	
	void give_book(const Book& b, const Patron& p);
	
	bool is_on_hand(const Book& b) const;
	
	vector<Patron> debter_list() const;

private:
	vector <Book> books;
	vector <Patron> readers;
	vector <Transaction> transactions;
};

}